
import random

if __name__=="__main__":

    while  True:
        n = int(input("请输入你要抽查的学生数量："))
        if n<=0:
            break
        cols = []
        for item in range(1,9):
            cols.append(item)
        rows = cols.copy()

        selectCols = random.sample(cols,n)
        rowsCols = random.sample(rows, n)

        for i in range(n):
            print(f"第{selectCols[i]}列，第{rowsCols[i]}行")
        print('-----------------------------------------------')
